#include <stdio.h>
#include <math.h>
int main()
{
 double a0;
 double a1;
 double a2;
 double y1;
 double y2;
 double y0;
 do
 {
  printf("print the min and the max of the region:");
  printf("\n");
  printf("(if i let you to input again,this means it has no result,please enter again)");
  scanf("%lf,%lf",&a1,&a2);
  y1=((2*a1-4)*a1+3)*a1-6;
  y2=((2*a2-4)*a2+3)*a2-6;
  }while(y1*y2>=0);
 do
 {y1=((2*a1-4)*a1+3)*a1-6;
  y2=((2*a2-4)*a2+3)*a2-6;
  a0=(a1+a2)/2;
  y0=((2*a0-4)*a0+3)*a0-6;
  if((y1*y0)<0)
  {a2=a0;
   y2=y0;
   }
   else
   {a1=a0;
    y1=y0;
    }
 }
    while(fabs(y0)>=1e-5);
    printf("the result is:%lf",a0);
    return 0;
 }